AT THE stroke of midnight, 156 years of British colonial rule over Hong Kong came to an end. During a solemn 30-minute ceremony Britain handed over one of the world's great citadels of capitalism to Communist China.
As a day rich in symbolism and pageantry, made more dramatic by pounding rain, came to an end, the Prince of Wales bade farewell to the 6.3 million people of Hong Kong , residents of Britain's last major colony.
"I should like, on behalf of Her Majesty the Queen and of the entire British people, to express our thanks, admiration, affection, and good wishes to all the people of Hong Kong who have been such staunch and special friends over so many generations," the Prince said.
"We shall not forget you, and we shall watch with the closest interest as you embark on this new era of your remarkable history."
Speaking before an audience of 4,000 guests, he said Hong Kong would have a strong identity of its own under China's "one country, two systems" framework. "China will tonight take responsibility for a place and a people which matter greatly to us all," the Prince said. "Our commitment and our strong links to Hong Kong will continue, and will, I am confident, flourish, as Hong Kong and its people themselves continue to flourish."
To the left of the dais from which he spoke, the Union and Hong Kong flags fluttered at the top of separate poles, courtesy of an artificially created wind. As his words died away, British and Chinese flag parties marched on to the stage to complete the final rites of colonial rule.
The British military band struck up the national anthem and, at 11.59pm the two British flags were lowered.
The last echo of God Save the Queen had hardly faded when another band - that of the People's Liberation Army - launched into the Chinese national anthem. As they did so, the red and yellow-starred flag of Communist China, and the emblem of the new Hong Kong - a white bauhinia flower on a red background - were raised on two poles at the opposite end of the stage.
Moments later, President Jiang Zemin, making his first visit to Hong Kong, approached the dais to hail the start of the new era.
"This is both a festival for the Chinese nation and a victory for the universal cause of peace and justice," he said. "On this solemn occasion, I wish to extend my cordial greetings and best wishes to the six million or more compatriots who have now returned to the embrace of the motherland."
Mr Jiang promised that Beijing would respect the freedoms and autonomy promised to the new Hong Kong in the 1984 Sino-British Joint Declaration. China would be responsible only for defence and foreign affairs.
His speech, which finished at about 12.10am, was greeted with loud applause by everyone except the principal British officials - the Prince, Tony Blair, the Prime Minister, Robin Cook, the Foreign Secretary and the Governor Chris Patten. The note of tension eased as the ceremony came to an end. Prince Charles shook hands and exchanged words with President Jiang. But a certain stiffness persisted - the legacy of the stormy relations between the two countries over the future of Hong Kong .
Indeed, bitterness endured to the very end of British rule with Chinese leaders refusing to attend a pre-handover banquet organised by the British side. Instead they stayed in a Kowloon hotel owned by Li Ka Shing, a pro-Beijing businessman.
There, well away from the demonstrators calling for more democracy, they held a brief meeting with Mr Blair in what both sides hoped would mark a new start in Sino-British relations.
Despite a growing wave of national consciousness in Hong Kong, the antipathy between Britain and China found no equal in relations between Britain and the people of the territory. Britons are not loved or admired in Hong Kong, but they are not loathed either.
Once the handover formalities were over, the Prince, Mr Patten and Gen Sir Charles Guthrie, the chief of the general staff, commander of the Hong Kong British forces, left the convention centre for the Royal Yacht Britannia to make their final departure from the island granted by the Chinese Emperor Daoguang to Queen Victoria in 1842 "in perpetuity".
The yacht, bound for Manila on its last voyage prior to decommissioning, cast off and steamed gently away into the night.
Britain had used the few hours before the handover to stage its own emotional farewell. In a moving ceremony, Mr Patten left Government House, a colonial pile now dwarfed by soaring towers, for the last time at 4.35pm.
After paying an affectionate goodbye to the staff who have served him and his family, he was presented with the Governor's own standard which had been taken down from the portico.
The focus then shifted to East Tamar, where in the presence of Prince Charles and Mr Blair, Britain bade a formal farewell with a tightly choreographed programme of dragon dances, parades, military tattoos, speeches and Chinese and Western music, compered by the actor Brian Blessed and Francis Yip, a Hong Kong singer.
Its climax lit up Victoria Harbour with a dazzling fireworks display.
Mr Patten said in a speech to the damp crowds: "Today is a matter of celebration, not sorrow." Having alluded to the Opium Wars, the origins of Britain's presence in Hong Kong, and the famines and political persecution in Communist China that forced hundreds of thousands to seek sanctuary in the colony, he said: "Sometimes people should remember the past the better to forget it."
He added that Britain's real contribution in Hong Kong had been "to provide the scaffolding for a prosperous future."
During his final message to the people of the colony, Mr Patten said: "Britain is part of Hong Kong's history, and Hong Kong is part of Britain's history. We are also part of each other's future."